package com.itheima_01.monitest.second;

public class Test2 {
    public static void main(String[] args) {
        String s="abcd678edfg123kjh0123shjd";
        StringBuilder sb1=new StringBuilder();
        StringBuilder sb2=new StringBuilder();
        StringBuilder sb3=new StringBuilder();

        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i)>='a'&&s.charAt(i)<='z'){
                sb1.append(s.charAt(i));
            }else if(s.charAt(i)>='0'&&s.charAt(i)<='9'){
                sb2.append(s.charAt(i));
            }
        }
        sb3=sb2.append(sb1);
        System.out.println(sb3);
    }
}
